<template>
  <div class="header">
    <div class="item icon" @click="back">
      <i class="iconfont icon-fanhui"></i>
      <span>{{fhObj.icon.txt}}</span>
    </div>
    <div class="item title">添加好友</div>
    <div class="item item3">
      <i class="iconfont icon-more"></i>
    </div>
  </div>
</template>
<script>
export default {
  name: "FHeader",

  props: {
    fhObj: {
      type: Object,
      default: function() {
        // console.info("---------sdsadsadsadsadsadsadsa--")
        return {
          icon: {
            txt: "返回",
            num: ""
          },
          title: ""
        };
      }
    }
  },

  mounted() {},
  methods: {
    back() {
      this.$router.go(-1);
    }
  }
};
</script>
<style lang="stylus" scoped>
.header {
  width: 100%;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  line-height: 0.85rem;
  background: #e8e8e8;
  z-index: 99;

  .item {
    flex: 1;

    .icon-fanhui {
      position: relative;
      top: 2px;
      left: 5px;
      font-weight: 600;
    }
  }

  .item3 {
    height: 100%;
    text-align: right;
    margin-right: 5px;
    font-size: 20px;
    display: inline-block;

    i {
      margin-bottom: 5px;
      font-weight: 600;
      position: relative;
      right: 0.1rem;
    }
  }

  .icon {
    display: inline-block;
    color: rgba(78, 78, 78, 1);

    i {
      font-size: 20px;
    }

    span {
      font-size: 16px;
    }
  }

  .title {
    display: inline-block;
    text-align: center;
  }
}
</style>

